<template>
  <div>
    <div class="btn-primary" @click="getSmsCode()">{{ smsText }}</div>
  </div>
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
import { namespace } from 'vuex-class';
// import { getModule } from 'vuex-module-decorators'

const SmsCode = namespace('SmsCode');
@Component
export default class TestApp extends Vue {
  @SmsCode.State(state => state.smsText) smsText?: string;
  @SmsCode.Mutation('countDown') smsCountDown!: Function;
  @SmsCode.Action('startCount') startSmsCount !: Function;
  mounted () {
    console.log(this.smsText)
    console.log(this.startSmsCount)
  }

  getSmsCode () {
    // this.smsCountDown();
    this.startSmsCount()
  }
}
</script>
